package com.ruoyi.member.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.member.mapper.FamilyMemberAudioMapMapper;
import com.ruoyi.member.domain.FamilyMemberAudioMap;
import com.ruoyi.member.service.IFamilyMemberAudioMapService;

/**
 * 家庭成员与音频映射Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-30
 */
@Service
public class FamilyMemberAudioMapServiceImpl implements IFamilyMemberAudioMapService 
{
    @Autowired
    private FamilyMemberAudioMapMapper familyMemberAudioMapMapper;

    /**
     * 查询家庭成员与音频映射
     * 
     * @param id 家庭成员与音频映射主键
     * @return 家庭成员与音频映射
     */
    @Override
    public FamilyMemberAudioMap selectFamilyMemberAudioMapById(Long id)
    {
        return familyMemberAudioMapMapper.selectFamilyMemberAudioMapById(id);
    }

    /**
     * 查询家庭成员与音频映射列表
     * 
     * @param familyMemberAudioMap 家庭成员与音频映射
     * @return 家庭成员与音频映射
     */
    @Override
    public List<FamilyMemberAudioMap> selectFamilyMemberAudioMapList(FamilyMemberAudioMap familyMemberAudioMap)
    {
        return familyMemberAudioMapMapper.selectFamilyMemberAudioMapList(familyMemberAudioMap);
    }

    /**
     * 新增家庭成员与音频映射
     * 
     * @param familyMemberAudioMap 家庭成员与音频映射
     * @return 结果
     */
    @Override
    public int insertFamilyMemberAudioMap(FamilyMemberAudioMap familyMemberAudioMap)
    {
        familyMemberAudioMap.setCreateTime(DateUtils.getNowDate());
        return familyMemberAudioMapMapper.insertFamilyMemberAudioMap(familyMemberAudioMap);
    }

    /**
     * 修改家庭成员与音频映射
     * 
     * @param familyMemberAudioMap 家庭成员与音频映射
     * @return 结果
     */
    @Override
    public int updateFamilyMemberAudioMap(FamilyMemberAudioMap familyMemberAudioMap)
    {
        familyMemberAudioMap.setUpdateTime(DateUtils.getNowDate());
        return familyMemberAudioMapMapper.updateFamilyMemberAudioMap(familyMemberAudioMap);
    }

    /**
     * 批量删除家庭成员与音频映射
     * 
     * @param ids 需要删除的家庭成员与音频映射主键
     * @return 结果
     */
    @Override
    public int deleteFamilyMemberAudioMapByIds(Long[] ids)
    {
        return familyMemberAudioMapMapper.deleteFamilyMemberAudioMapByIds(ids);
    }

    /**
     * 删除家庭成员与音频映射信息
     * 
     * @param id 家庭成员与音频映射主键
     * @return 结果
     */
    @Override
    public int deleteFamilyMemberAudioMapById(Long id)
    {
        return familyMemberAudioMapMapper.deleteFamilyMemberAudioMapById(id);
    }
}
